<?php 
	$this->session->set_flashdata('num',10);
	$semanaFiltro = $this->session->userdata('semanaActual');
?>
<script type="text/javascript">

	jQuery(document).ready(function(){
		jQuery("#list").jqGrid({
			url:		'<?php echo site_url()?>/indicadoresgventas24h/getOlderCompaniasExpress/',
			mtype:		'POST', 
			datatype:	'json',
			colNames:	['ID', 'Referencia', 'Tipo', 'C. Servicio', 'Registro', 'Etapa A.', 'Dias Registrada', 
				 		 'Etapa', 'Total', 'User', 'Responsable'],
			colModel:	[
			         	 {name: 'IdCompania', index: 'IdCompania', width: 5, hidden: true},
			         	 {name: 'NombreCompania', index: 'NombreCompania', width: 70},
			         	 {name: 'IdServicio', index: 'IdServicio', width: 40},
			         	 {name: 'cServicio', index: 'clasificacion_servicios', width: 30},
			         	 {name: 'FechaSysCompania', index: 'FechaSysCompania', width: 40},
			         	 {name: 'IdEtapa', index: 'idStatu', width: 35},
			         	 {name: 'DiasRegistrada', index: 'DiasRegistrada', width: 45},
			         	 {name: 'Etapa', index: 'Etapa', width: 32},
			         	 {name: 'Total', index: 'Total', width: 32},
			         	 {name: 'User', index: 'IdUsuario', width: 35},
			         	 {name: 'Responsable', index: 'Responsable', width: 40}
				 		],
			pager:		jQuery('#pager'),
			hiddengrid:	false,
			sortname: 	'FechaSysCompania',
			rowNum: 	5,
			rowList: 	[5,5,5,5,5],
			sortorder:	'ASC',
			height:		'100%',
			width:		'875',
			imgpath:	_base_url + 'public/css/jqgrid/flex/images',
			viewrecords:true,
			multiselect:true,
			adjacents:	4,
			jsonReader:	{repeatitems: false, id_Categoria: '0'}	
		});
	});
</script>
<?php echo form_open('indicadoresgventas24h/', array('name'	=>	'filterForm', 'id'	=>	'filterForm'));?>

<div class="table_container">
	<table>
		<tr>
			<td>
				<div id="titulo">Las 5 Compa&ntilde;ias M&aacute;s Viejas de las Etapas de Express</div>
			</td>
		</tr>
		<tr>
	       <td style="background: #D9E6F0;border: 1px solid #C3AA64; height: 23px">&nbsp; 
	              <b>Semanas:<b/>
	                     <select name="cantSemana" id="cantSemana">
					           <option value="9"  <?php if ($semanaFiltro == 9):?>selected="selected"<?php endif;?>>10</option>
					           <option value="15" <?php if ($semanaFiltro == 15):?>selected="selected"<?php endif;?>>16</option>
					           <option value="25" <?php if ($semanaFiltro == 25):?>selected="selected"<?php endif;?>>26</option>
					           <option value="51" <?php if ($semanaFiltro == 51):?>selected="selected"<?php endif;?>>52</option>
				         </select>
	                      <input type="submit" value="Buscar" id="btnBuscar"/><br/><br/>
	                <?php if($this->session->userdata('semanaActual')):?>
	 	  						<b style="color:blue">Semana:</b>
	                            <b style="color:red"><?php echo "El numero de Semana es: ".$semanaFiltro+=1; ?></b>
	 				<?php endif;?>
	        </td>
   		</tr>
		<tr>
			<td>
				<table id="list" class="scroll"></table>
				<div id="pager" class="scroll" style="text-align:center;"></div>
			</td>
		</tr>
	</table>
</div>
<?php $this->load->view('graficosgventas24h_view', $detallesExpress)?>